package com.glodon.paas.document.storage.directory.audit;

import java.util.Date;

import com.glodon.paas.document.storage.dao.mapper.AuditMapper;

public class DbAudit implements Audit {

    private AuditMapper auditMapper;


    public void setAuditMapper(AuditMapper auditMapper) {
        this.auditMapper = auditMapper;
    }


    @Override
    public void addObject(String objectId) {
        auditMapper.insertObject(objectId, "add", new Date());
    }


    @Override
    public void deleteObject(String objectId) {
        auditMapper.insertObject(objectId, "add", new Date());
    }


    @Override
    public void addPart(String partId) {
        auditMapper.insertObject(partId, "part", new Date());  
    }
}
